{% extends "base.html" %}

{% block title %}Search Page{%endblock%}

{%block content%}
<h1>Search Page</h1>
<form method="post" action ="">
    {{form}}
    <input type="submit" value="ara beni"/>
</form>
{% if pages %}
<h2>Search results for page name</h2>
<ul>
{% for page in pages %}
<li><a href="/wikicamp/page/{{page.name|escape}}/">{{page.name|escape}}</a></li>
{% endfor %}
</ul>
{% else %}
<ul><li><font color="red"> couldn't find any matches in page names</font></li>
{% endif %}

{% if contents %}
<h2>Search results for page contents</h2>
<ul>
{% for page in contents %}
<li><a href="/wikicamp/page/{{page.name|escape}}/">{{page.name|escape}}</a></li>
{% endfor %}
</ul>
{% endif %}

{%endblock%}